Draft
Conversation
Co-authored-by: benarch <29985769+benarch@users.noreply.github.com>
Co-authored-by: benarch <29985769+benarch@users.noreply.github.com>
Co-authored-by: benarch <29985769+benarch@users.noreply.github.com>
Co-authored-by: benarch <29985769+benarch@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove older branches except main from the repository
Add automation to remove 17 obsolete branches
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Repository has accumulated 17 obsolete branches that need removal while preserving
main.Changes
Created deletion automation with three execution paths:
.github/workflows/cleanup-old-branches.yml- Manual-trigger workflow that deletes all 17 branches atomically. Uses exact ref matching (refs/heads/$branch$) to prevent false positives.scripts/delete-old-branches.sh- Interactive bash script with confirmation prompt. Lists deleted/failed branches and shows final remote state viagit ls-remote.docs/BRANCH_CLEANUP.md- Execution guide covering workflow trigger, script usage, and manual GitHub UI deletion.Branches to Remove
Execution
After merge, trigger cleanup via Actions tab → "Cleanup Old Branches" → "Run workflow", or run
./scripts/delete-old-branches.shlocally with push access.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.